import request from '@/utils/request'

// 查询车次列表
export function listDeparture(query) {
  return request({
    url: '/departureManage/departure/list',
    method: 'get',
    params: query
  })
}

// 查询车次详细
export function getDeparture(id) {
  return request({
    url: '/departureManage/departure/' + id,
    method: 'get'
  })
}

// 新增车次
export function addDeparture(data) {
  return request({
    url: '/departureManage/departure',
    method: 'post',
    data: data
  })
}

// 修改车次
export function updateDeparture(data) {
  return request({
    url: '/departureManage/departure',
    method: 'put',
    data: data
  })
}

// 删除车次
export function delDeparture(id) {
  return request({
    url: '/departureManage/departure/' + id,
    method: 'delete'
  })
}

// 导出车次
export function exportDeparture(query) {
  return request({
    url: '/departureManage/departure/export',
    method: 'get',
    params: query
  })
}